//
//  GSDKRequestModel.h
//  GameSDK
//
//  Created by Johnny on 2017/7/28.
//  Copyright © 2017年 Johnny. All rights reserved.
//

#import <Foundation/Foundation.h>

#define DomainUrl @"http://api.zy1game.com/api?"
#define IAP_DomainUrl @"http://api.zy1game.com/api/callback/ios"

#pragma mark --- 一级：父类GSDKModel
@interface GSDKModel : NSObject
@property (nonatomic,copy) NSString *action;
- (NSDictionary*)jsonModel;
@end

#pragma mark --- 二级：父类GSDKSDKBaseModel继承父类GSDKModel
@interface GSDKSDKBaseModel : GSDKModel
@property (nonatomic,copy) NSString *cid;
@property (nonatomic,copy) NSString *gid;
@property (nonatomic,copy) NSString *ext;
@end

#pragma mark --- 二级：父类GSDKSDKOtherBaseModel继承父类GSDKModel
@interface GSDKOtherBaseModel : GSDKModel
@property (nonatomic,copy) NSString *gid;
@end

#pragma mark --- 获取更新
@interface GSDKGameVersionModel : GSDKSDKBaseModel
@property (nonatomic,copy) NSString *ver;
@property (nonatomic,copy) NSString *type;
@end

#pragma mark --- 激活
@interface GSDKActiveDeviceModel : GSDKSDKBaseModel
@property (nonatomic,copy) NSString *type;
@property (nonatomic,copy) NSString *device_token;
- (id)initWithToken:(NSString *)token;
@end

#pragma mark --- 子类GSDKGetMenuTestModel继承父类GSDKSDKBaseModel
@interface GSDKGetMenuModel : GSDKSDKBaseModel
@property (nonatomic,copy) NSString *token;
- (id)initWithToken:(NSString *)token;
@end

#pragma mark --- 登录
@interface GSDKLoginModel : GSDKSDKBaseModel
@property (nonatomic,copy) NSString *user_name;
@property (nonatomic,copy) NSString *password;
@property (nonatomic,copy) NSString *token;
@property (nonatomic,copy) NSString *type;
@property (nonatomic,copy) NSString *other;
- (id)initWithUserName:(NSString *)username
          withPassword:(NSString *)password
             withToken:(NSString *)token
              withType:(NSString *)type
             withOther:(NSString *)other;
@end

#pragma mark --- 注册
@interface GSDKRegisterModel : GSDKSDKBaseModel
@property (nonatomic,copy) NSString *user_name;
@property (nonatomic,copy) NSString *password;
@property (nonatomic,copy) NSString *token;
@property (nonatomic,copy) NSString *type;
@property (nonatomic,copy) NSString *other;
- (id)initWithUserName:(NSString *)username
          withPassword:(NSString *)password
             withToken:(NSString *)token
              withType:(NSString *)type;
@end

#pragma mark --- 获取随机名字和密码，一秒注册
@interface GSDKGetNameModel : GSDKSDKBaseModel
@property (nonatomic,copy) NSString *token;
- (id)initWithToken:(NSString *)token;
@end

#pragma mark --- 带login_token的父类
@interface GSDKLTBaseModel: GSDKSDKBaseModel
@property (nonatomic, copy) NSString *login_token;
@end

@interface GSDKGameOnlineTimeModel: GSDKLTBaseModel
@property (nonatomic, copy) NSString *token;
@property (nonatomic, copy) NSString *game_online_time;
- (id)initWithToken:(NSString *)token
  andGameOnlineTime:(NSString *)game_online_time;
@end

#pragma mark --- 退出登录
@interface GSDKLogoutModel : GSDKLTBaseModel
@property (nonatomic,copy) NSString *token;
- (id)initWithToken:(NSString *) token;
@end

#pragma mark --- 选服
@interface GSDKSelectServerModel : GSDKLTBaseModel
@property (nonatomic, copy) NSString *token;
@property (nonatomic, copy) NSString *game_ext;
- (id)initWithToken:(NSString *)token
         andGameExt:(NSString *)gameExt;
@end

#pragma mark ---内购列表
@interface GSDKGoodsConfigtModel : GSDKSDKBaseModel
@property (nonatomic,copy) NSString *token;
- (id)initWithToken:(NSString *) token;
@end

#pragma mark ---内购回调
@interface GSDKIAPCallBackModel : GSDKModel <NSCoding>
@property (nonatomic,copy) NSString *cid;
@property (nonatomic,copy) NSString *gid;
@property (nonatomic,copy) NSString *sid;
@property (nonatomic,copy) NSString *receipt;
@property (nonatomic,copy) NSString *token;
@property (nonatomic,copy) NSString *game_order_id;
@property (nonatomic,copy) NSString *game_other;
@property (nonatomic,copy) NSString *sandbox;
@property (nonatomic,copy) NSString *goods_id;
@property (nonatomic,copy) NSString *goods_name;
@property (nonatomic,copy) NSString *goods_price;
@property (nonatomic,copy) NSString *pay_money;
@property (nonatomic,copy) NSString *login_token;
- (id)initIAPCallBackWithSid:(NSString *)sid
                  andReceipt:(NSString *)receipt
                    andToken:(NSString *)token
              andGameOrderId:(NSString *)game_order_id
                andGameOther:(NSString *)game_other
                  andSandbox:(NSString *)sandbox
                  andGoodsId:(NSString *)goods_id
                andGoodsName:(NSString *)goods_name
               andGoodsPrice:(NSString *)goods_price
                 andPayMoney:(NSString *)pay_money
               andLoginToken:(NSString *)login_token;

@end

#pragma mark ---web
@interface GSDKWebModel : NSObject
@property (nonatomic,copy) NSString *cid;
@property (nonatomic,copy) NSString *sid;
@property (nonatomic,copy) NSString *gid;
@property (nonatomic,copy) NSString *language;
@property (nonatomic,copy) NSString *token;
@property (nonatomic,copy) NSString *login_token;

- (id)initIAPCallBackWithSid:(NSString *)sid
                    andToken:(NSString *)token
              andLogin_token:(NSString *)login_token;

- (NSDictionary*)jsonModel;
- (NSString *)getUrlParameter;
@end

#pragma mark ---web支付
@interface GSDKWebPayModel : NSObject
@property (nonatomic,copy) NSString *cid;
@property (nonatomic,copy) NSString *gid;
@property (nonatomic,copy) NSString *sid;
@property (nonatomic,copy) NSString *ext;
@property (nonatomic,copy) NSString *token;
@property (nonatomic,copy) NSString *game_order_id;
@property (nonatomic,copy) NSString *game_other;
@property (nonatomic,copy) NSString *login_token;
@property (nonatomic,copy) NSString *sandbox;
@property (nonatomic,copy) NSString *goods_id;
@property (nonatomic,copy) NSString *goods_name;
@property (nonatomic,copy) NSString *goods_price;
@property (nonatomic,copy) NSString *pay_money;

- (id)initIAPCallBackWithSid:(NSString *)sid
                    andToken:(NSString *)token
              andGameOrderId:(NSString *)game_order_id
                andGameOther:(NSString *)game_other
                  andSandbox:(NSString *)sandbox
                  andGoodsId:(NSString *)goods_id
                andGoodsName:(NSString *)goods_name
               andGoodsPrice:(NSString *)goods_price
                 andPayMoney:(NSString *)pay_money
                 andLoginToken:(NSString *)login_token;

- (NSDictionary*)jsonModel;

- (NSString *)getUrlParameter;
@end

#pragma mark --- 回调
@interface GSDKResponseModel : NSObject
@property (nonatomic, assign) int code;
@property (nonatomic, copy) NSString * msg;
@end
